(function () {
    var States = [
        {
            name: 'login',
            url: '/login.html',
            component: 'xxLogin'
        }, {
            name: 'register',
            url: '/register.html',
            component: 'xxRegister'
        }, {
            name: 'registerCon',
            url: '/registerCon.html',
            component: 'xxRegisterCon'
        }, {
            name: 'user',
            url: '/user',
            component: 'xxUser'
        },{
            name: 'user.home',
            url: '/home.html',
            component: 'xxHome'
        },{
            name: 'user.search-drug',
            url: '/search-drug.html',
            component: 'xxSearchDrug'
        },{
            name: 'user.pharmacy-info',
            url: '/pharmacy-info.html',
            component: 'xxPharmacyInfo'
        },{
            name: 'user.order-list',
            url: '/order-list.html',
            component: 'xxOrderList'
        },{
            name: 'user.order-detail',
            url: '/order-detail.html/{orderId}',
            component: 'xxOrderDetail'
        },{
            name: 'user.person-info',
            url: '/person-info.html',
            component: 'xxPersonInfo'
        }, {
            name:'user.drug-info',
            url:'/drug-info.html/{drugId}',
            component:'xxDrugInfo'
        }, {
            name: 'user.shopping-cart',
            url: '/shopping-car.html',
            component: 'xxShoppingCart'
        },{
            name: 'drug-manager',
            url: '/drug-manager',
            component: 'xxDrugManager'
        },{
            name: 'drug-manager.order-processing',
            url: '/order-processing.html',
            component: 'xxOrderProcessing'
        },{
            name: 'drug-manager.order-info',
            url: '/order-info.html/{orderId}',
            component: 'xxOrderInfo'
        },{
            name: 'drug-manager.stock-manage',
            url: '/stock-manage.html',
            component: 'xxStockManage'
        },{
            name: 'drug-manager.update-stock',
            url: '/update-stock.html/{shopId}/{drugId}',
            component: 'xxUpdateStock'
        },{
            name: 'system-manager',
            url: '/system-manager',
            component: 'xxSystemManager'
        },{
            name: 'system-manager.create-account',
            url: '/create-account.html',
            component: 'xxCreateAccount'
        },{
            name: "otherwise",
            url: "*path",
            controller: function ($state) {
                $state.go('user.home');
            }
        }
    ];
    angular.module('app')
        .constant('ROUTER_CONSTANT', States);
})();